/******************************************************************************/
/*! 
    ISingleton.h
    [2012]

    \file		ISingleton.h
    \namespace  Game
    \brief      
*/
/******************************************************************************/
#ifndef NLOGGER_H
#define NLOGGER_H
/*** Includes *****************************************************************/
#include <Windows.h>
#include <iostream>
#include <fstream>
/*** Forward Declarations *****************************************************/
/*** Namespace ****************************************************************/
namespace Game
{
/*** Macros *******************************************************************/

/*** Constants ****************************************************************/
/*** Interface ****************************************************************/
inline void FileLog(const char* outFileName, const char* msg, const char* file,int lineNum)
{
	std::ofstream log;
	log.open(outFileName, std::ios::out | std::ios::app | std::ios::binary);
	if(log.is_open())
	{
		log << msg;

		log << file;

		log << lineNum;

		log << "\n";
	}
	log.close();
}

inline void OutPutLog(const char* msg, const char*,  int)
{
	OutputDebugString(msg);
	OutputDebugString("\n");
}

#define OUTLOG(msg) Game::OutPutLog(msg,__FILE__,__LINE__);
#define FILELOG(msg) Game::FileLog("..\\..\\nero_log.bin",msg,__FILE__,__LINE__);

}
#endif //NLOGGER_H